package com.spooky.sync.note.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager.LayoutParams;
import android.widget.TextView;
import com.spooky.sync.R;

public class ViewNoteDialog extends Dialog {
	private String mText = null;

	protected ViewNoteDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {
		super(context, cancelable, cancelListener);
	}

	public ViewNoteDialog(Context context) {
		super(context);
	}

	public ViewNoteDialog(Context context, int theme) {
		super(context, theme);
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.view_note_dialog);
		LayoutParams params = getWindow().getAttributes();
		params.height = LayoutParams.FILL_PARENT;
		params.width = LayoutParams.FILL_PARENT;
		getWindow().setAttributes(params);
		TextView text = (TextView) findViewById(R.id.view_note_dialog_text);
		text.setText(getText());
	}

	public void onEdit(View view) {
	}

	public void setText(String text) {
		mText = text;
	}

	public String getText() {
		return mText == null ? "" : mText;
	}
}
